package com.edu.demo.mapper;

import com.edu.demo.entity.Project;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jixuewei
 * @since 2023-01-12
 */
@Mapper
public interface ProjectMapper extends BaseMapper<Project> {

    List<Project> selectProject(Project project);

    @Select("select count(*) from project where status = 0")
    int countRecruit();

    @Select("select count(*) from project where mid_term = 0 and status = 1")
    int countMidTerm();

    @Select("select count(*) from project where  conclusion= 0 and status = 1 and mid_term = 1")
    int countConclusion();
}
